#ifndef DACTIVEELEMENT_H
#define DACTIVEELEMENT_H

#include "delement.h"
#include <QtCore/QVector>

class DPort : public QObject
{
	Q_OBJECT

public:
	DPort(QObject* parent) : QObject(parent) {}

	QString name;
	QString typeOf;
	QString direction;
	bool multiple;
	QString note;
	int ordinal;
};

class DActiveElement : public DElement
{
	Q_OBJECT

public:
	DActiveElement(QObject *parent=0) : DElement(parent) {
		mInPorts = 0;
		mOutPorts = 0;	
	}
	~DActiveElement() {}

	QVector<DPort*> ports() { return mPorts; }
	int sumInPorts() { return mInPorts; }
	int sumOutPorts(){ return mOutPorts; }

protected:
	virtual GElement* doCreateGraphics();
	virtual void parseDetail(const QDomElement& e);

private:
	QVector<DPort*> mPorts;
	int mInPorts;
	int mOutPorts;
};

#endif // DACTIVEELEMENT_H
